<?php
/**
 * 
 *
 * @author Chen HuiYun <11chenhuiyun@gmail.com>
 * @copyright Copyright &copy; 2012-2020 MyyTaijii Software LLC
 */

/**
 * @author Chen HuiYun
 */
class BLog
{
	private static $_logger = null;
	
	private static function getLogger($name)
	{
		$basePath = Ji::getPathOfAlias('base');
		Logger::configure($basePath.'/config/log4php.properties');
		return Logger::getLogger($name);
	}
	
	public static function info($object, $msg)
	{
		$logger = self::getLogger(get_class($object));
		$logger->info($msg);
	}
	
	public static function debug($object, $msg)
	{
		$logger = self::getLogger(get_class($object));
		$logger->debug($msg);
	}
	
	public static function error($object, $msg)
	{
		$logger = self::getLogger(get_class($object));
		$logger->error($msg);
	}
	
	public static function warn($object, $msg)
	{
		$logger = self::getLogger(get_class($object));
		$logger->warn($msg);
	}
}
